package testUnitaire;

import static org.junit.Assert.assertEquals;

import java.util.Collection;

import org.junit.Test;

/**
 * @author clgardin
 * 
 */
public class TestRemoveEtudiant {
	Etudiant malik = new Etudiant("Malik");
	Etudiant claudio = new Etudiant("Claudio");
	Formation master1 = new Formation("BTS");
	Formation master2 = new Formation("M2");

	@Test
	public void test() {

		malik.noter(12f, 19f);
		claudio.noter(6f, 11f);

		master1.addEtudiant(malik);
		master2.addEtudiant(claudio);

		Collection<Etudiant> e = master1.getListeEtudiant();
		int tailleM1Avant = e.size();
		Collection<Etudiant> e2 = master2.getListeEtudiant();
		int tailleM2Avant = e2.size();

		master2.addEtudiant(malik);

		assertEquals(tailleM1Avant - 1, master1.getListeEtudiant().size());
		assertEquals(tailleM2Avant + 1, master2.getListeEtudiant().size());
	}
}
